package com.momo.springboot_dev_test.contrller;

import com.momo.springboot_dev_test.model.User;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class UserController {

    @GetMapping("/user/{id}")
    public User getUserById(@PathVariable Long id){
        User user = new User();
        user.setId(id);
        user.setUsername("momo");
        return user;
    }
}
